import java.util.*;
public class Math2 {
        public static void main(String[] args) {
            Random a = new Random();
            Scanner b = new Scanner(System.in);
            //String[] opear = {"-", "+", "*", "/"};
            int num1, num2, num3;
            System.out.println("请输入题目的个数");
            num1 = b.nextInt();
            // System.out.println(num2 );
            //System.out.println(num3);
            for (int i = 0; i < num1; i++) {
                int numer1= a.nextInt(100);
                int numer2 = a.nextInt(100);
                int denom1 = a.nextInt(99) + 1;
                int denom2 = a.nextInt(99) + 1;
                int numer3 = a.nextInt(99) + 1;
                int opeart = a.nextInt(4) + 1;
                if (opeart == 1) ;
                {
                    System.out.println(numer1 + "/" + denom1 + "+" + numer2 + "/" + denom2 + "=?");
                }
                if (opeart == 2) {
                    System.out.println(numer1 + "/" + denom1 + "-" + numer2 + "/" + denom2 + "=?");
                }
                if (opeart == 3) {
                    System.out.println(numer1 + "/" + denom1 + "*" + numer2 + "/" + denom2 + "=?");
                }
                if (opeart == 4) {
                    System.out.println(numer1 + "/" + denom1 + "/" + numer3 + "/" + denom2 + "=?");
                }


            }

        }
    }


